package cate.common.table.item.furniture.sheet;

import cate.common.table.ESheet;
import cate.common.table.UnuseDefaultMap;
import cate.common.table.item.furniture.row.FurnitureLimitRow;

@UnuseDefaultMap
public class FurnitureLimitSheet extends ESheet<FurnitureLimitRow> {
    @Override
    public String getSheetName() {
        return "手办装备上限";
    }

    public int getTypeLimit(int type) {
        FurnitureLimitRow limit = getList().stream().filter(e -> e.type == type).findAny().orElse(null);
        return limit == null ? 0 : limit.limit;
    }
}
